<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="Dashboard">
  <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
  <title>Dashio - Bootstrap Admin Template</title>

  <!-- Favicons -->
  <link href="${pageContext.request.contextPath }/img/favicon.png" rel="icon">
  <link href="${pageContext.request.contextPath }/img/apple-touch-icon.png" rel="apple-touch-icon">

  <!-- Bootstrap core CSS -->
  <link href="${pageContext.request.contextPath }/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <!--external css-->
  <link href="${pageContext.request.contextPath }/lib/font-awesome/css/font-awesome.css" rel="stylesheet" />
  <!-- Custom styles for this template -->
  <link href="${pageContext.request.contextPath }/css/style.css" rel="stylesheet">
  <link href="${pageContext.request.contextPath }/css/style-responsive.css" rel="stylesheet">
  <link rel="stylesheet" href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css" />
  <!-- =======================================================
    Template Name: Dashio
    Template URL: https://templatemag.com/dashio-bootstrap-admin-template/
    Author: TemplateMag.com
    License: https://templatemag.com/license/
  ======================================================= -->
</head>

<body>
  <section id="container">
    <!-- **********************************************************************************************************************************************************
        TOP BAR CONTENT & NOTIFICATIONS
        *********************************************************************************************************************************************************** -->
    <!--header start-->
    <header class="header black-bg">
      <div class="sidebar-toggle-box">
        <div class="fa fa-bars tooltips" data-placement="right" data-original-title="Toggle Navigation"></div>
      </div>
      <!--logo start-->
      <a href="index.jsp" class="logo"><b>DASH<span>IO</span></b></a>
      <!--logo end-->
      <div class="top-menu">
        <ul class="nav pull-right top-menu">
           <li><a class="logout" href="${pageContext.request.contextPath }/UserController?op=exit">退出登录</a></li>
        </ul>
      </div>
    </header>
    <!--header end-->
    <!-- **********************************************************************************************************************************************************
        MAIN SIDEBAR MENU
        *********************************************************************************************************************************************************** -->
    	 <!--sidebar start-->
    <aside>
      <div id="sidebar" class="nav-collapse ">
        <!-- sidebar menu start-->
        <ul class="sidebar-menu" id="nav-accordion">
        	<p class="centered"><a href="index.jsp">
        	<!--管理员头像-->
          <!-- 默认头像 -->
			<c:if test="${sessionScope.backUser.u_img ==null}">
				<img  src="${pageContext.request.contextPath }/images/ui-sam.jpg" class="img-circle" width="80" />
			</c:if>
			<!-- 自定义头像 -->
			<c:if test="${sessionScope.backUser.u_img !=null}">
				<img  src="${pageContext.request.contextPath }/DownloadServlet?fileName=${sessionScope.backUser.u_img}"  class="img-circle" width="80" />
			</c:if>
          </a></p>
          <!--管理员名-->
          <h5 class="centered">${sessionScope.backUser.u_name}</h5>
          <li class="mt">
            <a href="${pageContext.request.contextPath }/back/index.jsp">
              <i class="fa fa-dashboard"></i>
              <span>公司信息</span>
              </a>
          </li>
          <li class="sub-menu">
            <a href="javascript:;">
              <i class="fa fa-desktop"></i>
              <span>用户管理</span>
              </a>
            <ul class="sub">
              <li><a href="${pageContext.request.contextPath }/back/user-information.jsp">用户信息</a></li>
              <li><a href="${pageContext.request.contextPath }/back/adduser.jsp">添加用户</a></li>
            </ul>
          </li>
          <li class="sub-menu">
            <a href="javascript:;">
              <i class="fa fa-tasks"></i>
              <span>车次管理</span>
              </a>
            <ul class="sub">
              <li><a href="${pageContext.request.contextPath }/back/bus-information.jsp">车次信息</a></li>
              <li><a href="${pageContext.request.contextPath }/MomentsController?op=queryMents">时刻信息</a></li>
              <li><a href="${pageContext.request.contextPath }/back/addmoment.jsp">添加时刻表</a></li>
              <li><a href="${pageContext.request.contextPath }/back/addsite.jsp">添加车次</a></li>  
            </ul>
          </li>
          <li class="sub-menu">
            <a href="javascript:;">
              <i class="fa fa-th"></i>
              <span>站点管理</span>
              </a>
            <ul class="sub">
              <li><a href="${pageContext.request.contextPath }/back/bussite-information.jsp">站点信息</a></li>
              <li><a href="${pageContext.request.contextPath }/back/addbussite.jsp">添加站点</a></li>
              <li><a href="${pageContext.request.contextPath }/back/addbusSites.jsp">新增站点</a></li>
            </ul>
          </li>
    
          <li class="sub-menu">
            <a href="javascript:;">
              <i class="fa fa-comments-o"></i>
              <span>公告栏管理</span>
              </a>
            <ul class="sub">
              <li><a href="${pageContext.request.contextPath }/AnnouncementController?op=queryAnn">公告栏信息</a></li>
            </ul>
          </li>
          <li>
             <a class="active" href="${pageContext.request.contextPath }/back/baidu_maps.jsp">
              <i class="fa fa-map-marker"></i>
              <span>百度地图</span>
              </a>
          </li>
        </ul>
        <!-- sidebar menu end-->
      </div>
    </aside>
     <!--sidebar end-->
     
    <!-- **********************************************************************************************************************************************************
        MAIN CONTENT
        *********************************************************************************************************************************************************** -->
    <!--main content start-->
    <section id="main-content">
      <section class="wrapper site-min-height">
        <div class="row mt">
          <div class="col-sm-12">
            <section class="panel">
              <header class="panel-heading">
                Google Map with Loaction List
              </header>
              <div class="panel-body">
                <div id="gmap-list"></div>
              </div>
            </section>
          </div>
        </div>
        <!-- page end-->
      </section>
      <!-- /wrapper -->
    </section>
    <!-- /MAIN CONTENT -->
    <!--main content end-->
    <!--footer start-->
    <footer class="site-footer">
      <div class="text-center">
        <p>
          &copy; Copyrights <strong>Dashio</strong>. All Rights Reserved
        </p>
        <div class="credits">
          <!--
            You are NOT allowed to delete the credit link to TemplateMag with free version.
            You can delete the credit link only if you bought the pro version.
            Buy the pro version with working PHP/AJAX contact form: https://templatemag.com/dashio-bootstrap-admin-template/
            Licensing information: https://templatemag.com/license/
          -->
          Created with Dashio template by <a href="https://templatemag.com/">TemplateMag</a>
        </div>
        <a href="google_maps.jsp#" class="go-top">
          <i class="fa fa-angle-up"></i>
          </a>
      </div>
    </footer>
    <!--footer end-->
  </section>
  <!-- js placed at the end of the document so the pages load faster -->
  <script src="${pageContext.request.contextPath }/lib/jquery/jquery.min.js"></script>
  <script src="${pageContext.request.contextPath }/lib/bootstrap/js/bootstrap.min.js"></script>
  <script class="include" type="text/javascript" src="${pageContext.request.contextPath }/lib/jquery.dcjqaccordion.2.7.js"></script>
  <script src="${pageContext.request.contextPath }/lib/jquery.scrollTo.min.js"></script>
  <script src="${pageContext.request.contextPath }/lib/jquery.nicescroll.js" type="text/javascript"></script>
  <!--common script for all pages-->
  <script src="${pageContext.request.contextPath }/lib/common-scripts.js"></script>
  <!--script for this page-->
  <!--Baidu Map-->
  <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=DDd05fcba9fea5b83bf648515e04fc4c"></script>
  <script type="text/javascript" src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"></script>
  <script type="text/javascript">
		 // 百度地图API功能
	  var map = new BMap.Map("gmap-list");
	  map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);
	  setTimeout(function(){
			map.setZoom(14);   
		}, 2000);  //2秒后放大到14级
		map.enableScrollWheelZoom(true);
	  // 添加定位控件
	  var geolocationControl = new BMap.GeolocationControl();
	  geolocationControl.addEventListener("locationSuccess", function(e){
	    // 定位成功事件
	    var address = '';
	    address += e.addressComponent.province;
	    address += e.addressComponent.city;
	    address += e.addressComponent.district;
	    address += e.addressComponent.street;
	    address += e.addressComponent.streetNumber;
	    alert("当前定位地址为：" + address);
	  });
	  geolocationControl.addEventListener("locationError",function(e){
	    // 定位失败事件
	    alert(e.message);
	  });
	  map.addControl(geolocationControl);
	  var styleOptions = {
		    strokeColor:"red",    //边线颜色。
		    fillColor:"red",      //填充颜色。当参数为空时，圆形将没有填充效果。
		    strokeWeight: 3,       //边线的宽度，以像素为单位。
		    strokeOpacity: 0.8,    //边线透明度，取值范围0 - 1。
		    fillOpacity: 0.6,      //填充的透明度，取值范围0 - 1。
		    strokeStyle: 'solid' //边线的样式，solid或dashed。
		}
		    //实例化鼠标绘制工具
				var drawingManager = new BMapLib.DrawingManager(map, {
		    isOpen: false, //是否开启绘制模式
		    enableDrawingTool: true, //是否显示工具栏
		    drawingToolOptions: {
		        anchor: BMAP_ANCHOR_TOP_RIGHT, //位置
		        offset: new BMap.Size(5, 5), //偏离值
		    },
		    circleOptions: styleOptions, //圆的样式
		    polylineOptions: styleOptions, //线的样式
		    polygonOptions: styleOptions, //多边形的样式
		    rectangleOptions: styleOptions //矩形的样式
		});  
	</script>
</body>

</html>

